package com.wzw.springboot.principle.use.es.model;

import com.wzw.springboot.principle.use.es.constant.Es;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import java.io.Serializable;

/**
 * @author Wangzhiwen
 */
@Data
@Accessors(chain = true)
@Document(indexName = Es.USER_INDEX)
public class UserIndex implements Serializable {

    @Id
    private Long id;

    @Field
    private String name;

    @Field
    private String sex;

    @Field
    private Boolean enabled;

}
